Repository navigation
feat: attach files from the web page, and give it a favicon - #202
Merged
Merged
Conversation
A browser may now send upload-file in its chunked form: the file travels on the signed stream itself, every chunk under the browser's signature, and lands in the workspace's uploads folder as a phone's does. The Blossom form stays refused: it names a URL for the bridge to download (through the Tor proxy when one is set), a browser has no Blossom server of its own, and taking it would let a page make the bridge fetch any URL it names. The engine test covers both forms; the web page end-to-end test attaches a two-chunk file and reads it back from where the agent was told it is. Co-Authored-By: Claude Code <[email protected]>
The page's tab showed the browser's blank icon. It now links /favicon.png: the app's launcher logo itself, scaled down from the launcher's foreground image onto its dark background with rounded corners (64 px, 5 KB), served like the page's other files (img-src 'self' already allows it). A test reads the page's HTML and checks that every file it links is served before sign-in. Co-Authored-By: Claude Code <[email protected]>
The composer gets an Attach button; a file pasted into the message box or dropped on the session works too. The file goes up in chunks on the signed stream, each a signed upload-file command of about 180,000 base64 characters (inside the stream's 256 KiB frame cap), the next sent only once the bridge answered the last, with its progress shown on the file. The words typed with it become the message, as on the phone. The page refuses a file over the bridge's 25 MB cap before reading it, drops a chosen file when another session is opened so it never reaches the wrong one, and keeps a file dropped elsewhere from replacing the page. Verified in headless Chrome against a held bridge: a 1.1 MB file in nine chunks arrived byte for byte where the fake agent was told it is. Co-Authored-By: Claude Code <[email protected]>
WEB-CLIENT.md moves upload-file to what a browser may send, in its chunked form, says why the Blossom form stays refused, and describes how the page sends a file. BRIDGE.md lists attaching a file among what the page does. Co-Authored-By: Claude Code <[email protected]>
deymosh
force-pushed
the
feat/web-uploads
branch
from
November 22, 2026 04:13
07ba13e to
be09f25
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Opens one of the commands a browser on the web page was refused, and gives the page a favicon.
Decision:
upload-fileopens, chunked form only.bridge_core::browser_may_sendnow takesupload-filewhen it carries chunks: the file travels on the signed stream itself, every chunk under the browser's key, and lands in the workspace's.codedeck/uploadsas a phone's does. The Blossom form stays refused: it names a URL for the bridge to download (through the Tor proxy when one is set), a browser has no Blossom server of its own, and taking it would let a page make the bridge fetch any URL it names. Credentials (set-credentials,set-provider-profile,account-action) and the terminal stay refused for now, as decided with the maintainer.Page. The composer gets Attach; a paste into the message box or a drop on the session works too. Chunks of ~180,000 base64 characters (inside the stream's 256 KiB frame cap), each a signed
CMD, the next sent once the last one'sOKcame back, with progress on the file. The words typed with it become the message and ride in the first chunk, which carries that much less of the file; words over ~90 KB are refused with a file (on their own they still go). The page refuses a file over the bridge's 25 MB cap before reading it, drops a chosen file when another session is opened, and stops a file dropped elsewhere from replacing the page.Favicon.
/favicon.png: the app's launcher logo itself, scaled down from the launcher's foreground image onto its dark background (64 px, 5 KB;img-src 'self'already allows it).Commits: bridge-core gate + tests → favicon → page → docs (
WEB-CLIENT.md,BRIDGE.md).Cost. No relay traffic. A browser file costs one P-256 verify and one JSON decode per ~135 KB chunk on the bridge (about 190 for a 25 MB file), at the pace the bridge answers; nothing changes for a phone.
Verified
bridge-coreweb_client: a chunk from a browser reaches the runtime, the Blossom form does nothing; both tests fail with the gate flipped.web_pageend-to-end (./codedeck e2e): the real runtime and agent host; a browser attaches a two-chunk file and the test reads it back from the path the agent was told.web::tests::every_file_the_page_links_is_served_before_sign_inreads the page's HTML and fetches every file it links../codedeck check --changed.What review changed (the bug hunt found three real issues, all folded into their commits):
OKmeans the bridge has the chunk queued, not that the file reached the agent; a session that stopped, 16 open uploads or a failed write drop it with no answer on the wire (the phone has the same gap). The page now waits a minute for the agent's message naming the file to show up in the transcript and says so when it does not. A real acknowledgement would be a wire change, left for later.Not checked: Firefox and Safari (neither is installed on the machine this was built on), so that stays owed.
🤖 Generated with Claude Code